//
//  MovieModel.m
//  UI_19_H
//
//  Created by 男哥逗比 on 16/1/29.
//  Copyright © 2016年 YHY. All rights reserved.
//

#import "MovieModel.h"
#import "DetailModel.h"

@implementation MovieModel

- (instancetype)initWithDataSource:(NSDictionary *)dataSource {
    
    self = [super init];
    
    if (self) {
        
        [self setValuesForKeysWithDictionary:dataSource];
        
        NSMutableArray *array = [NSMutableArray arrayWithCapacity:0];
        
        for (NSDictionary *dic in self.entries) {
            
            DetailModel *detailModel = [[DetailModel alloc] init];
            [detailModel setValuesForKeysWithDictionary:dic];
            [array addObject:detailModel];
        }
        self.entries = [NSArray arrayWithArray:array];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

- (id)valueForUndefinedKey:(NSString *)key {
    return nil;
}

@end
